package com.njuse.jvmfinal.Instruction;

import java.nio.ByteBuffer;

import com.njuse.jvmfinal.runtimestructure.Jframe;

public class L2D extends Instruction {
	public  void readindex(ByteBuffer reader) {
		//pass
	}
	
	public  void execute(Jframe frame) {
		int top=frame.getStacktop();
		Object[] stack=frame.getManagestack();
		int high=(int) stack[top-1];
		int low=(int) stack[top-2];
		top=top-2;
		long number=(((long) high) << 32) | ((long) low & 0x0ffffffffL);
		double doublenumber=(double) number;
		long temp=Double.doubleToLongBits(doublenumber);
		int lownumber=(int) temp;
		int highnumber=(int) (temp>>32);
		stack[top]=lownumber;
		stack[top+1]=highnumber;
		top=top+2;
		frame.setManagestack(stack);
		frame.setStacktop(top);
	}
}
